<template>
	<view :class="{'light':theme=='light'}">
		<view class="status_bar">
			<view class="top_view"></view>
		</view>
		<view class="tc bgPart fixed zdx100 w100 ptb5 ">
			<view class="flex alcenter bdb_blue3  bdt_blue3  plr15">
				<view :class="['flex1 h40 lh40 radius4 ft14',{'bgBlue white':current==0}]" @tap="changeType(0)">{{ $t('assets.lever') }}</view>
				<view :class="['flex1 h40 lh40 radius4 ft14',{'bgBlue white':current==1}]" @tap="changeType(1)">{{ $t('assets.iso') }}</view>
			</view>
		</view>
		<view class="" v-if="current==0">
			<lever :lod="lod" :reload="reload"></lever>
		</view>
		<view class="" v-if="current==1">
			<iso :lod="lod"></iso>
		</view>
	</view>
</template>

<script>
	import { mapState } from 'vuex';
	import iso from '../iso/lever.vue';
	import lever from '../lever/lever.vue';
	export default {
		components:{
			iso,
			lever,
		},
		data() {
			return {
				current:0,
				lod:0,
				fromType:'',
				bottom:0,
				reload:0
			};
		},

		computed: {
			...mapState(['theme']),
		},
		onShow() {
			this.lod = this.lod+1;
			// this.$utils.setThemeTop(this.theme);
			// let fromType = uni.getStorageSync('from') || '';
			// // #ifdef APP-PLUS
			// fromType = plus.storage.getItem('from') || '';//本地交易类型
			// // #endif
			// if(fromType=='trade'){
			// 	this.current = 0;
			// 	this.reload = this.reload+1;
			// 	// #ifdef APP-PLUS
			// 		plus.storage.removeItem('from')
			// 	// #endif
			// 	// #ifdef H5
			// 		localStorage.removeItem('from')
			// 	// #endif
			// }
		},
		onLoad() {
			
		},
		onUnload(){
			
		},
		onHide() {
			
		},
		
		methods: {
			changeType(current){
				this.current = current;
			}
		},
		onPullDownRefresh() {
			this.lod = this.lod+1;
		},
		onReachBottom() {
			this.bottom = this.bottom+1;
		}
	};
</script>

<style>
</style>
